package com.scuec.tourismwebsite.service;

import com.scuec.tourismwebsite.entity.City;
import com.scuec.tourismwebsite.mapper.CityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityService {

    @Autowired
    private CityMapper cityMapper;
    public List<City> getAllCities() {

        return cityMapper.findAll();  // 查询所有城市
    }
}
